From 9d05cb2474b444a8042ea08ab438b59d455a56ca Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Tue, 24 Feb 2004 10:55:24 +0000 Subject: [PATCH] bitkeeper revision 1.740.1.1 (403b2d9cPtJ1eKIhZY0pelA-D7cKLA) cciss.c: Fix CCISS driver when no controller present. --- xen/drivers/block/cciss.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/xen/drivers/block/cciss.c b/xen/drivers/block/cciss.c index 6e7096c890..ae63352e57 100644 --- a/xen/drivers/block/cciss.c +++ b/xen/drivers/block/cciss.c @@ -443,6 +443,10 @@ void cciss_probe_devices(xen_disk_info_t *xdi) ctlr = 0; /* XXX SMH: only deal with 1 controller for now */ + /* Bail if there is no controller. */ + if ( hba[ctlr] == NULL ) + return; + /* Loop through each real device */ for(i=0; i < NWD; i++) { @@ -450,11 +454,10 @@ void cciss_probe_devices(xen_disk_info_t *xdi) if (!(drv->nr_blocks)) continue; - + if ( xdi->count == xdi->max ) BUG(); - - + hba[ctlr]->hd[i << NWD_SHIFT].nr_sects = hba[ctlr]->sizes[i << NWD_SHIFT] = drv->nr_blocks; @@ -3409,7 +3412,7 @@ static struct pci_driver cciss_pci_driver = { int __init cciss_init(void) { - printk(KERN_INFO DRIVER_NAME "\n"); +/* printk(KERN_INFO DRIVER_NAME "\n");*/ /* Register for out PCI devices */ return pci_module_init(&cciss_pci_driver); } -- 2.30.2